home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / cprog / metre.lha / kultur / metre.patch < prev    next >
Encoding:
Text File  |  1994-11-13  |  4.0 KB  |  176 lines

  1. --- w:SCOptions    Sun Nov 13 18:21:45 1994
  2. +++ SCOptions    Sat Nov 05 21:51:46 1994
  3. @@ -0,0 +1,35 @@
  4. +Ansi
  5. +Batch
  6. +NoDebug
  7. +Error=All
  8. +ErrorRexx
  9. +Ignore=306
  10. +IncludeDir=A31:
  11. +LinkOpts=NoAlvs
  12. +LinkOpts=NoDebug
  13. +MemSize=Huge
  14. +MultiCharacterConstants
  15. +NoIcons
  16. +NoMultipleIncludes
  17. +NoStackCheck
  18. +OnError=Continue
  19. +Optimize
  20. +OptimizerComplexity=10
  21. +OptimizerDepth=10
  22. +OptimizerInlineLocal
  23. +OptimizerRecurDepth=10
  24. +NoOptimizerScheduler
  25. +OptimizerTime
  26. +Parameters=Registers
  27. +SmallCode
  28. +SmallData
  29. +Startup=cres
  30. +Strict
  31. +StringMerge
  32. +Verbose
  33. +Define=__ANSI__
  34. +Define=USE_BUILTIN_MATH
  35. +Define=AMIGA
  36. +Define=STDC_HEADERS
  37. +Define=KULTUR
  38. +Ignore=187
  39. --- w:SMakefile    Sun Nov 13 18:21:42 1994
  40. +++ SMakefile    Sun Nov 13 18:17:19 1994
  41. @@ -0,0 +1,35 @@
  42. +all:    metre
  43. +
  44. +OBJS= lex_yy.o rules.o ytab.o
  45. +
  46. +metre:    $(OBJS)
  47. +    sc link pname $@ $(OBJS)
  48. +
  49. +ytab.h:    gram.y
  50. +    byacc -d $<
  51. +    rename y.tab.h ytab.h
  52. +    rename y.tab.c ytab.c
  53. +
  54. +lex_yy.c:    scan.l
  55. +    flex $<
  56. +    rename lex.yy.c lex_yy.c
  57. +
  58. +lex_yy.o: lex_yy.c ytab.h metreint.h metre.h
  59. +    sc objname $@ $<
  60. +
  61. +rules.o: rules.c metre.h
  62. +    sc objname $@ $<
  63. +
  64. +ytab.o: ytab.c ytab.h metreint.h metre.h
  65. +    sc objname $@ $<
  66. +
  67. +ytab.c:    ytab.h
  68. +
  69. +clean:
  70. +    delete ytab.h ytab.c lex_yy.c *.o metre.lnk
  71. +
  72. +realclean:    clean
  73. +    delete metre
  74. +
  75. +dist:
  76. +    LhA -H2 -IaAdemrxZ2 -b64 -P-1 -v0 -Qh64 a Ram:metre \#?
  77. --- w:gram.y    Wed Sep 07 19:10:00 1994
  78. +++ gram.y    Sat Nov 05 21:39:12 1994
  79. @@ -710,6 +710,8 @@
  80.  **************************************************************/
  81.  
  82.  #include <stdio.h>
  83. +#include <stdlib.h>
  84. +#include <ctype.h>
  85.  #include <limits.h>
  86.  #include <stdarg.h>
  87.  #include "metreint.h"
  88. @@ -867,6 +869,10 @@
  89.  static void int_fatal(int, char *, ...);
  90.  static void int_warn(int, char *, ...);
  91.  
  92. +#ifdef KULTUR
  93. +extern int yyparse (void);
  94. +extern int yylex (void);
  95. +#endif
  96.  
  97.  /* Functions. */
  98.  
  99. --- w:metre.h    Wed Sep 07 19:10:54 1994
  100. +++ metre.h    Sat Nov 05 21:37:22 1994
  101. @@ -193,4 +193,6 @@
  102.  extern void fatal(int, char *, ...);
  103.  extern void warn(int, char *, ...);
  104.  
  105. +extern void rules (void);
  106. +
  107.  #endif
  108. --- w:scan.l    Wed Sep 07 19:36:38 1994
  109. +++ scan.l    Sat Nov 05 21:22:54 1994
  110. @@ -34,6 +34,9 @@
  111.     and pclex.  Note: Berkeley is considered same as AT&T lex, and Posix is not
  112.     considered at all.
  113.  */
  114. +#ifdef FLEX_SCANNER
  115. +#define MTR_FLEX
  116. +#else
  117.  #ifdef YY_INIT
  118.  #ifdef YY_INPUT
  119.  #define MTR_PCLEX
  120. @@ -47,6 +50,7 @@
  121.  #define MTR_ATTLEX
  122.  #endif
  123.  #endif
  124. +#endif
  125.  
  126.  /*
  127.     Redefine size of miniscule yytext[].  Should have no affect on other lex's.
  128. @@ -192,6 +196,8 @@
  129.  static void yy_init(void);
  130.  #endif
  131.  
  132. +extern void rules (void);
  133. +
  134.  /* Static variables. */
  135.  
  136.  #if READ_LINE
  137. @@ -299,11 +305,8 @@
  138.                                accounting and return token to parser.
  139.                             */
  140.                             count(); return(TK_CONSTANT); }
  141. -0[xX]{H}+{IS}?          { count(); return(TK_CONSTANT); }
  142. -0{D}+{IS}?              { count(); return(TK_CONSTANT); }
  143.  0{D}+{IS}?              { count(); return(TK_CONSTANT); }
  144.  {D}+{IS}?               { count(); return(TK_CONSTANT); }
  145. -{D}+{IS}?               { count(); return(TK_CONSTANT); }
  146.  '(\\.|[^\\'])+'         { count(); return(TK_CONSTANT); }
  147.  {D}+{E}{FS}?            { count(); return(TK_CONSTANT); }
  148.  {D}*"."{D}+({E})?{FS}?  { count(); return(TK_CONSTANT); }
  149. @@ -397,7 +400,7 @@
  150.              identifier, substitute replacement string for this lexeme.
  151.           */
  152.           if (repl_str != NULL && strncmp(&cmd_line_argv[i][2], id,
  153. -                                       repl_str - &cmd_line_argv[i][2]) == 0)
  154. +                             (size_t) (repl_str - &cmd_line_argv[i][2])) == 0)
  155.           {
  156.              unsigned len;
  157.              char *p;
  158. @@ -531,8 +534,6 @@
  159.  /* Read next line from input file, returning number of characters read. */
  160.  static int my_yyinput(char *buf, int max_size)
  161.  {
  162. -   int characters_read;
  163. -
  164.     if (fgets(buf, max_size, yyin) == NULL)
  165.        buf[0] = '\0';
  166.     else
  167. @@ -540,7 +541,7 @@
  168.        if (display_input)
  169.           fputs(buf, out_fp);
  170.  
  171. -   return strlen(buf);
  172. +   return (int) strlen(buf);
  173.  }
  174.  
  175.  #endif      /* #if READ_LINE */
  176.